package vip.xiaonuo.smzq.modular.dictionary.mapper;

import org.apache.ibatis.annotations.Select;
import vip.xiaonuo.smzq.modular.dictionary.entity.Cb01Zh;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import vip.xiaonuo.smzq.modular.dictionary.entity.vo.Cb01ZhVo;

import java.util.List;

/**
 * 字典表1综合 Mapper
 *
 * @author eomer
 * @since 2024-02-21
 */
@Mapper
public interface Cb01ZhMapper extends BaseMapper<Cb01Zh> {

    /**
     * 矿产字典查询
     *
     * @author Kevin
     * @since 2024/7/22 17:40
     */
    @Select("select '企业类型' as type, * from kcl_cb01_zh where bh = 46 and bnm != 0\n" +
            "union all\n" +
            "select '生产状态' as type, * from kcl_cb01_zh where bh = 47 and bnm != 0\n" +
            "union all\n" +
            "select '矿山规模' as type, * from kcl_cb01_zh where bh = 49 and bnm != 0\n" +
            "union all\n" +
            "select '计量单位和矿产质量指标单位' as type, * from kcl_cb01_zh where bh = 29 and bnm != 0\n" +
            "union all\n" +
            "select '开采方式' as type, * from kcl_cb01_zh where bh = 26 and bnm != 0\n" +
            "union all\n" +
            "select '开拓方式' as type, * from kcl_cb01_zh where bh = 45 and bnm != 0\n" +
            "union all\n" +
            "select '采矿方式' as type, * from kcl_cb01_zh where bh = 44 and bnm != 0\n" +
            "union all\n" +
            "select '选矿方式' as type, * from kcl_cb01_zh where bh = 48 and bnm != 0\n" +
            "union all\n" +
            "select '选矿难易程度' as type, * from kcl_cb01_zh where bh = 20 and bnm != 0\n" +
            "union all\n" +
            "select '选矿实验程度' as type, * from kcl_cb01_zh where bh = 27 and bnm != 0\n" +
            "union all\n" +
            "select '回收类别' as type, * from kcl_cb01_zh where bh = 18 and bnm != 0\n" +
            "union all\n" +
            "select '构造复杂程度' as type, * from kcl_cb01_zh where bh = 31 and bnm != 0\n" +
            "union all\n" +
            "select '煤层稳定程度' as type, * from kcl_cb01_zh where bh = 32 and bnm != 0\n" +
            "union all\n" +
            "select '沼气等级' as type, * from kcl_cb01_zh where bh = 33 and bnm != 0\n" +
            "union all\n" +
            "select '煤尘' as type, * from kcl_cb01_zh where bh = 34 and bnm != 0\n" +
            "union all\n" +
            "select '矿区远景评价' as type, * from kcl_cb01_zh where bh = 35 and bnm != 0\n" +
            "union all\n" +
            "select '储量规模' as type, * from kcl_cb01_zh where bh = 13 and bnm != 0\n" +
            "union all\n" +
            "select '矿体形态' as type, * from kcl_cb01_zh where bh = 13 and bnm != 0\n" +
            "union all\n" +
            "select '提交评审原因' as type, * from kcl_cb01_zh where bh = 30 and bnm != 0\n" +
            "union all\n" +
            "select '勘察阶段' as type, * from kcl_cb01_zh where bh = 15 and bnm in (101,102,103)\n" +
            "union all\n" +
            "select '利用情况' as type, * from kcl_cb01_zh where bh = 12 and bnm != 0\n" +
            "union all\n" +
            "select '评价阶段' as type, * from kcl_cb01_zh where bh = 50 and bnm != 0\n" +
            "union all\n" +
            "select '建设项目类别' as type, * from kcl_cb01_zh where bh = 42 and bnm != 0\n" +
            "union all\n" +
            "select '压覆性质' as type, * from kcl_cb01_zh where bh = 55 and bnm != 0\n" +
            "union all\n" +
            "select '资料类型' as type, * from kcl_cb01_zh where bh = 300 and bnm != 0\n" +
            "union all\n" +
            "select '矿业权库类型' as type, * from kcl_cb01_zh where bh = 301 and bnm != 0\n" +
            "union all\n" +
            "select '矿业权登记类型' as type, * from kcl_cb01_zh where bh = 302 and bnm != 0\n" +
            "union all\n" +
            "select '节点类型' as type, * from kcl_cb01_zh where bh = 303 and bnm != 0\n" +
            "union all\n" +
            "select '知识库文件类型' as type, * from kcl_cb01_zh where bh = 304 and bnm != 0\n" +
            "union all\n" +
            "select '变更类型' as type, * from kcl_cb01_zh where bh = 305 and bnm != 0\n" +
            "union all\n" +
            "select '驾驶舱消息类型' as type, * from kcl_cb01_zh where bh = 306 and bnm != 0\n" +
            "union all\n" +
            "select '预警类型' as type, * from kcl_cb01_zh where bh = 308 and bnm != 0\n" +
            "union all\n" +
            "select '上表标识' as type, * from kcl_cb01_zh where bh = 71 and bnm != 0\n" +
            "union all\n" +
            "select '评审备案-报告类型' as type, * from kcl_cb01_zh where bh = 309 and bnm != 0" +
            "union all\n" +
            "SELECT '矿产大类不包括建材子类' AS type, * FROM kcl_cb01_zh WHERE   bh=770 and  bnm != 0")
    List<Cb01ZhVo> getKcDictionaryList();
}
